import {request, params} from './http.js' //引入http.js

export default {
	params,
	auth:(code)=>{
		return request('user/auth','POST',{'code':code})
	},
	login:(userInfo)=>{
		return request('user/login','POST',userInfo)
	},
	getUserInfo: (data) => {
		return request('user/getUserInfo', 'POST', data) //接口地址
	},
	upload: (data) => {
		return request('/ccf/dds', 'POST', data, true) //上传接口地址
	},
	getBooks: (type) => {
		return request('Wechat/GetBooks', 'POST', {type:type}) 
	},
	getWrods:(data)=>{
		return request('Wechat/getWords', 'POST', data)
	},
	UploadAnswer:(data)=>{
		return request('Wechat/UploadAnswer', 'POST', data)
	},
	async getStudyBooks(data={}){
		return request('Wechat/getStudyBooks', 'POST', data)
	},
	getUserWords:(data)=>{
		return request('Wechat/getUserWords', 'POST', data)
	}
}
